
Partial Class CustomerEmail
    Inherits System.Web.UI.Page

    Protected Sub SendButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SendButton.Click
        Dim ms As New _
             System.Net.Mail.SmtpClient("localhost")
        ms.Send(Me.ToText.Text, Me.FromText.Text, _
             Me.SubjectText.Text, Me.BodyText.Text)
    End Sub

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim SearchString As String
        SearchString = CType(Me.PreviousPage.Controls("FromText"), TextBox).Text
    End Sub
End Class
